<?php

$this->pageTitle=Yii::app()->name . ' - Cambiar clave';
$this->breadcrumbs=array(
	'Cambiar clave',
);
?>

<h1>Cambiar clave</h1>

<?php if(Yii::app()->user->hasFlash('cambiar_password')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('cambiar_password'); ?>
</div>

<?php else: ?>

<p>Formulario para cambio de clave:</p>

<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'password-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<p class="note">Los campos marcados con <span class="required">*</span> son obligatorios.</p>

	<div class="row">
		<?php echo $form->labelEx($model,'passwordVieja'); ?>
		<?php echo $form->passwordField($model,'passwordVieja'); ?>
		<?php echo $form->error($model,'passwordVieja'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'passwordNueva'); ?>
		<?php echo $form->passwordField($model,'passwordNueva'); ?>
		<?php echo $form->error($model,'passwordNueva'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'passwordNuevaRep'); ?>
		<?php echo $form->passwordField($model,'passwordNuevaRep'); ?>
		<?php echo $form->error($model,'passwordNuevaRep'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton(Yii::t('translations','Guardar')); ?>
	</div>

<?php $this->endWidget(); ?>
</div><!-- form -->

<?php endif; ?>